home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / mask.z / mask
Text File  |  1998-10-30  |  6KB  |  151 lines

  1. MASK(3I)                                               Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      __mmaasskk, __mmaasskkll, __mmaasskkrr, MMAASSKK - Returns a bit mask
  6.  
  7. SSYYNNOOPPSSIISS
  8.      C/C++:
  9.  
  10.      ##iinncclluuddee <<iinnttrriinnssiiccss..hh>>
  11.      lloonngg __mmaasskk ((lloonngg _i));;
  12.      lloonngg __mmaasskkll ((lloonngg _i));;
  13.      lloonngg __mmaasskkrr ((lloonngg _i));;
  14.  
  15.      Fortran:
  16.  
  17.      MMAASSKK (([II==]_i))
  18.  
  19. IIMMPPLLEEMMEENNTTAATTIIOONN
  20.      C/C++:  UNICOS and UNICOS/mk systems
  21.  
  22.      Fortran:  UNICOS, UNICOS/mk, and IRIX systems
  23.  
  24. SSTTAANNDDAARRDDSS
  25.      C/C++:  Cray Research extension
  26.  
  27.      Fortran:  CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
  28.      90
  29.  
  30. CC//CC++++ DDEESSCCRRIIPPTTIIOONN
  31.      The __mmaasskk function forms a mask of bits set to 1, left-justified or
  32.      right-justified.  If 0 <= _i <= 63, a left-justified mask of bits set
  33.      to 1, _i bits long, is formed.  Otherwise, a right-justified mask of
  34.      bits set to 1, (128 - _i) bits long, is formed.  Value _i must be in the
  35.      range of 0 through 128.
  36.  
  37.      The __mmaasskkll function returns a left-justified mask of _i bits set to 1.
  38.      Value _i must be in the range of 0 through 64.
  39.  
  40.      The __mmaasskkrr function returns a right-justified mask of _i bits set to 1.
  41.      Value _i must be in the range of 0 through 64.
  42.  
  43.      Because these are intrinsic functions, no externally visible library
  44.      functions are available for them.  The compiler generates inline code
  45.      to produce the result.
  46.  
  47. FFOORRTTRRAANN DDEESSCCRRIIPPTTIIOONN
  48.      The MMAASSKK function returns a bit mask of 1's.
  49.  
  50.      On UNICOS systems, the argument is a 64-bit integer.
  51.  
  52.      On UNICOS/mk systems, the argument is a 32-bit or 64-bit integer.
  53.  
  54.      On IRIX systems, the argument is an 8-bit, 16-bit, 32-bit, or 64-bit
  55.      integer.
  56.  
  57.      It accepts the following argument:
  58.  
  59.      _i    In Fortran, this must be an integer argument, as follows:
  60.  
  61.           * If _i is an 8-bit object, _i must be in the range 0 <= _i <= 16.
  62.  
  63.           * If _i is a 16-bit object, _i must be in the range 0 <= _i <= 32.
  64.  
  65.           * If _i is a 32-bit object, _i must be in the range 0 <= _i <= 64.
  66.  
  67.           * If _i is a 64-bit object, _i must be in the range 0 <= _i <= 128.
  68.  
  69.      MMAASSKK is an elemental function.  The name of this function cannot be
  70.      passed as an argument.
  71.  
  72.      This is an outmoded routine.  Refer to the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e
  73.      _M_a_n_u_a_l, _V_o_l_u_m_e _2, publication SR-3903, for information about outmoded
  74.      features and their preferred standard alternatives.
  75.  
  76. RREETTUURRNN VVAALLUUEESS
  77.      In C/C++, the mask functions return a 64-bit object.
  78.  
  79.      In Fortran, MMAASSKK returns a Boolean result on UNICOS and UNICOS/mk
  80.      systems.  It returns an integer result on IRIX systems.
  81.  
  82.      When _i is a 64-bit object, the return values are of the following
  83.      form:
  84.  
  85.      * If _i is in the range 0 <= _i <= 64, a left-justified mask of _i bits
  86.        is returned.
  87.  
  88.      * If _i is in the range 65 <= _i <= 128, a right-justified mask of (128
  89.        - _i) bits is returned.
  90.  
  91.      When _i is a 32-bit object, the return values are of the following
  92.      form:
  93.  
  94.      * If _i is in the range 0 <= _i <= 32, a left-justified mask of _i bits
  95.        is returned.
  96.  
  97.      * If _i is in the range 33 <= _i <= 64, a right-justified mask of (64 -
  98.        _i) bits is returned.
  99.  
  100.      When _i is a 16-bit object, the return values are of the following
  101.      form:
  102.  
  103.      * If _i is in the range 0 <= _i <= 16, a left-justified mask of _i bits
  104.        is returned.
  105.  
  106.      * If _i is in the range 17 <= _i <= 32, a right-justified mask of (32 -
  107.        _i) bits is returned.
  108.  
  109.      When _i is a 8-bit object, the return values are of the following form:
  110.  
  111.      * If _i is in the range 0 <= _i <= 8, a left-justified mask of _i bits is
  112.        returned.
  113.  
  114.      * If _i is in the range 7 <= _i <= 16, a right-justified mask of (16 -
  115.        _i) bits is returned.
  116.  
  117. EEXXAAMMPPLLEESS
  118.      Fortran:  The following section of Fortran code shows the MMAASSKK
  119.      function used with several different arguments.  The bit patterns of
  120.      the results are given.
  121.  
  122.           INTEGER I1, I2, I3
  123.           ...
  124.           I1 = MASK(3)
  125.           I2 = MASK(64)
  126.           I3 = MASK(127)
  127.  
  128.            -----------------------------------------------------
  129.           | 1 | 1 | 1 | 0 | 0 | 0 | 0 |    ...    | 0 | 0 | 0 |
  130.            -----------------------------------------------------
  131.                                      I1
  132.  
  133.            ---------------------------------------------
  134.           | 1 | 1 | 1 | 1 |    ...    | 1 | 1 | 1 | 1 |
  135.            ---------------------------------------------
  136.                               I2
  137.  
  138.            ---------------------------------------------
  139.           | 0 | 0 | 0 | 0 |    ...    | 0 | 0 | 0 | 1 |
  140.            ---------------------------------------------
  141.                               I3
  142.  
  143. SSEEEE AALLSSOO
  144.      A complete list of C/C++ intrinsic functions available on Cray
  145.      Research systems is in the _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR
  146.      -2179.
  147.  
  148.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  149.      printed version of this man page.
  150.  
  151.